import request from '@/utils/request'

// 收款单列表
export function billsReceiptList(data) {
    return request({
        url: '/system/billsMakeCollections/list',
        method: 'get',
        params: data
    })
}

// 新建收款单
export function billsReceiptAdd(data) {
    return request({
        url: '/system/billsMakeCollections/insert',
        method: 'post',
        data: data
    })
}

// 编辑收款单
export function billsReceiptUpdate(data) {
    return request({
        url: '/system/billsMakeCollections/update',
        method: 'post',
        data: data
    })
}

// 获取收款单详细信息
export function billsReceiptDetail(id) {
    return request({
        url: '/system/billsMakeCollections/selectOne?collectionId=' + id,
        method: 'get'
    })
}

// 审核
export function billsReceiptAudit(data) {
    return request({
        url: '/system/billsMakeCollections/audit',
        method: 'post',
        data: data
    })
}

// 查询客户数据
export function billsReceiptCustomerData(data) {
    return request({
        url: '/system/billsMakeCollections/queryCustomers',
        method: 'get',
        params: data
    })
}

// 拆单
export function billsReceiptSplitBill(id) {
    return request({
        url: '/system/billsMakeCollections/splitBill?collectionId=' + id,
        method: 'get',
    })
}